import React from 'react';
import { GridLoader } from 'react-spinners';
import { Box } from 'gestalt';

const Loader = ({ show }) => (
  show && <Box
    position="absolute"
    dangerouslySetInlineStyle={{
      __style: {
        bottom: 400,
        left: '50%',
        transform: 'translateX(-50%)'
      }
    }}
  >
    <GridLoader color="darkorange" size={25} margin="3" />
  </Box>
)

export default Loader;